3.1.7 \(\int \csc ^5(e+f x) (a+b \sec ^2(e+f x)) \, dx\) [7]

3.1.7.1 Optimal result
3.1.7.2 Mathematica [B] (verified)
3.1.7.3 Rubi [A] (verified)
3.1.7.4 Maple [A] (verified)
3.1.7.5 Fricas [B] (verification not implemented)
3.1.7.6 Sympy [F]
3.1.7.7 Maxima [A] (verification not implemented)
3.1.7.8 Giac [B] (verification not implemented)
3.1.7.9 Mupad [B] (verification not implemented)

3.1.7.1 Optimal result

Integrand size = 21, antiderivative size = 81 \[ \int \csc ^5(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=-\frac {3 (a+5 b) \text {arctanh}(\cos (e+f x))}{8 f}-\frac {(3 a+7 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac {(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac {b \sec (e+f x)}{f} \]

output
-3/8*(a+5*b)*arctanh(cos(f*x+e))/f-1/8*(3*a+7*b)*cot(f*x+e)*csc(f*x+e)/f-1 
/4*(a+b)*cot(f*x+e)*csc(f*x+e)^3/f+b*sec(f*x+e)/f
 
3.1.7.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(198\) vs. \(2(81)=162\).

Time = 6.26 (sec) , antiderivative size = 198, normalized size of antiderivative = 2.44 \[ \int \csc ^5(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=\frac {-2 (3 a+7 b) \csc ^2\left (\frac {1}{2} (e+f x)\right )-(a+b) \csc ^4\left (\frac {1}{2} (e+f x)\right )+\frac {2 \left (-3 (a+13 b)+4 \cos (e+f x) \left (8 b+3 (a+5 b) \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )-3 (a+5 b) \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )\right )\right ) \sec ^2\left (\frac {1}{2} (e+f x)\right )-(a+b) \sec ^4\left (\frac {1}{2} (e+f x)\right )+(4 (a+2 b)+(3 a+7 b) \cos (e+f x)) \sec ^4\left (\frac {1}{2} (e+f x)\right ) \tan ^2\left (\frac {1}{2} (e+f x)\right )}{-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )}}{64 f} \]

input
Integrate[Csc[e + f*x]^5*(a + b*Sec[e + f*x]^2),x]
 
output
(-2*(3*a + 7*b)*Csc[(e + f*x)/2]^2 - (a + b)*Csc[(e + f*x)/2]^4 + (2*(-3*( 
a + 13*b) + 4*Cos[e + f*x]*(8*b + 3*(a + 5*b)*Log[Cos[(e + f*x)/2]] - 3*(a 
 + 5*b)*Log[Sin[(e + f*x)/2]]))*Sec[(e + f*x)/2]^2 - (a + b)*Sec[(e + f*x) 
/2]^4 + (4*(a + 2*b) + (3*a + 7*b)*Cos[e + f*x])*Sec[(e + f*x)/2]^4*Tan[(e 
 + f*x)/2]^2)/(-1 + Tan[(e + f*x)/2]^2))/(64*f)
 
3.1.7.3 Rubi [A] (verified)

Time = 0.26 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.20, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 4621, 361, 25, 361, 25, 359, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \csc ^5(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {a+b \sec (e+f x)^2}{\sin (e+f x)^5}dx\)

\(\Big \downarrow \) 4621

\(\displaystyle -\frac {\int \frac {\left (a \cos ^2(e+f x)+b\right ) \sec ^2(e+f x)}{\left (1-\cos ^2(e+f x)\right )^3}d\cos (e+f x)}{f}\)

\(\Big \downarrow \) 361

\(\displaystyle -\frac {\frac {(a+b) \cos (e+f x)}{4 \left (1-\cos ^2(e+f x)\right )^2}-\frac {1}{4} \int -\frac {\left (3 (a+b) \cos ^2(e+f x)+4 b\right ) \sec ^2(e+f x)}{\left (1-\cos ^2(e+f x)\right )^2}d\cos (e+f x)}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\frac {1}{4} \int \frac {\left (3 (a+b) \cos ^2(e+f x)+4 b\right ) \sec ^2(e+f x)}{\left (1-\cos ^2(e+f x)\right )^2}d\cos (e+f x)+\frac {(a+b) \cos (e+f x)}{4 \left (1-\cos ^2(e+f x)\right )^2}}{f}\)

\(\Big \downarrow \) 361

\(\displaystyle -\frac {\frac {1}{4} \left (\frac {(3 a+7 b) \cos (e+f x)}{2 \left (1-\cos ^2(e+f x)\right )}-\frac {1}{2} \int -\frac {\left ((3 a+7 b) \cos ^2(e+f x)+8 b\right ) \sec ^2(e+f x)}{1-\cos ^2(e+f x)}d\cos (e+f x)\right )+\frac {(a+b) \cos (e+f x)}{4 \left (1-\cos ^2(e+f x)\right )^2}}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\frac {1}{4} \left (\frac {1}{2} \int \frac {\left ((3 a+7 b) \cos ^2(e+f x)+8 b\right ) \sec ^2(e+f x)}{1-\cos ^2(e+f x)}d\cos (e+f x)+\frac {(3 a+7 b) \cos (e+f x)}{2 \left (1-\cos ^2(e+f x)\right )}\right )+\frac {(a+b) \cos (e+f x)}{4 \left (1-\cos ^2(e+f x)\right )^2}}{f}\)

\(\Big \downarrow \) 359

\(\displaystyle -\frac {\frac {1}{4} \left (\frac {1}{2} \left (3 (a+5 b) \int \frac {1}{1-\cos ^2(e+f x)}d\cos (e+f x)-8 b \sec (e+f x)\right )+\frac {(3 a+7 b) \cos (e+f x)}{2 \left (1-\cos ^2(e+f x)\right )}\right )+\frac {(a+b) \cos (e+f x)}{4 \left (1-\cos ^2(e+f x)\right )^2}}{f}\)

\(\Big \downarrow \) 219

\(\displaystyle -\frac {\frac {1}{4} \left (\frac {1}{2} (3 (a+5 b) \text {arctanh}(\cos (e+f x))-8 b \sec (e+f x))+\frac {(3 a+7 b) \cos (e+f x)}{2 \left (1-\cos ^2(e+f x)\right )}\right )+\frac {(a+b) \cos (e+f x)}{4 \left (1-\cos ^2(e+f x)\right )^2}}{f}\)

input
Int[Csc[e + f*x]^5*(a + b*Sec[e + f*x]^2),x]
 
output
-((((a + b)*Cos[e + f*x])/(4*(1 - Cos[e + f*x]^2)^2) + (((3*a + 7*b)*Cos[e 
 + f*x])/(2*(1 - Cos[e + f*x]^2)) + (3*(a + 5*b)*ArcTanh[Cos[e + f*x]] - 8 
*b*Sec[e + f*x])/2)/4)/f)
 

3.1.7.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 359
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2), x 
_Symbol] :> Simp[c*(e*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*e*(m + 1))), x] + 
Simp[(a*d*(m + 1) - b*c*(m + 2*p + 3))/(a*e^2*(m + 1))   Int[(e*x)^(m + 2)* 
(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] 
&& LtQ[m, -1] &&  !ILtQ[p, -1]
 

rule 361
Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] : 
> Simp[(-a)^(m/2 - 1)*(b*c - a*d)*x*((a + b*x^2)^(p + 1)/(2*b^(m/2 + 1)*(p 
+ 1))), x] + Simp[1/(2*b^(m/2 + 1)*(p + 1))   Int[x^m*(a + b*x^2)^(p + 1)*E 
xpandToSum[2*b*(p + 1)*Together[(b^(m/2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c 
- a*d)*x^(-m + 2))/(a + b*x^2)] - ((-a)^(m/2 - 1)*(b*c - a*d))/x^m, x], x], 
 x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && ILtQ[m/ 
2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4621
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ 
)]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f 
   Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff*x)^n)^p/(ff*x)^(n*p)), 
x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/ 
2] && IntegerQ[n] && IntegerQ[p]
 
3.1.7.4 Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.48

method result size
derivativedivides \(\frac {a \left (\left (-\frac {\csc \left (f x +e \right )^{3}}{4}-\frac {3 \csc \left (f x +e \right )}{8}\right ) \cot \left (f x +e \right )+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{8}\right )+b \left (-\frac {1}{4 \sin \left (f x +e \right )^{4} \cos \left (f x +e \right )}-\frac {5}{8 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )}+\frac {15}{8 \cos \left (f x +e \right )}+\frac {15 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{8}\right )}{f}\) \(120\)
default \(\frac {a \left (\left (-\frac {\csc \left (f x +e \right )^{3}}{4}-\frac {3 \csc \left (f x +e \right )}{8}\right ) \cot \left (f x +e \right )+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{8}\right )+b \left (-\frac {1}{4 \sin \left (f x +e \right )^{4} \cos \left (f x +e \right )}-\frac {5}{8 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )}+\frac {15}{8 \cos \left (f x +e \right )}+\frac {15 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{8}\right )}{f}\) \(120\)
parallelrisch \(\frac {24 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) \left (a +5 b \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (a +b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}+\left (7 a +15 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}+\left (a +b \right ) \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}+\left (7 a +15 b \right ) \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-16 a -160 b}{64 f \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-64 f}\) \(136\)
norman \(\frac {\frac {a +b}{64 f}+\frac {\left (a +b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{10}}{64 f}+\frac {\left (7 a +15 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{64 f}+\frac {\left (7 a +15 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}}{64 f}-\frac {\left (a +10 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{4 f}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )}+\frac {3 \left (a +5 b \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 f}\) \(144\)
risch \(\frac {{\mathrm e}^{i \left (f x +e \right )} \left (3 a \,{\mathrm e}^{8 i \left (f x +e \right )}+15 b \,{\mathrm e}^{8 i \left (f x +e \right )}-8 a \,{\mathrm e}^{6 i \left (f x +e \right )}-40 b \,{\mathrm e}^{6 i \left (f x +e \right )}-22 a \,{\mathrm e}^{4 i \left (f x +e \right )}+18 b \,{\mathrm e}^{4 i \left (f x +e \right )}-8 a \,{\mathrm e}^{2 i \left (f x +e \right )}-40 b \,{\mathrm e}^{2 i \left (f x +e \right )}+3 a +15 b \right )}{4 f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{4} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}+\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) a}{8 f}+\frac {15 \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) b}{8 f}-\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) a}{8 f}-\frac {15 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) b}{8 f}\) \(237\)

input
int(csc(f*x+e)^5*(a+b*sec(f*x+e)^2),x,method=_RETURNVERBOSE)
 
output
1/f*(a*((-1/4*csc(f*x+e)^3-3/8*csc(f*x+e))*cot(f*x+e)+3/8*ln(csc(f*x+e)-co 
t(f*x+e)))+b*(-1/4/sin(f*x+e)^4/cos(f*x+e)-5/8/sin(f*x+e)^2/cos(f*x+e)+15/ 
8/cos(f*x+e)+15/8*ln(csc(f*x+e)-cot(f*x+e))))
 
3.1.7.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 178 vs. \(2 (75) = 150\).

Time = 0.26 (sec) , antiderivative size = 178, normalized size of antiderivative = 2.20 \[ \int \csc ^5(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=\frac {6 \, {\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{4} - 10 \, {\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{2} - 3 \, {\left ({\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{5} - 2 \, {\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{3} + {\left (a + 5 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + 3 \, {\left ({\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{5} - 2 \, {\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{3} + {\left (a + 5 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + 16 \, b}{16 \, {\left (f \cos \left (f x + e\right )^{5} - 2 \, f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )\right )}} \]

input
integrate(csc(f*x+e)^5*(a+b*sec(f*x+e)^2),x, algorithm="fricas")
 
output
1/16*(6*(a + 5*b)*cos(f*x + e)^4 - 10*(a + 5*b)*cos(f*x + e)^2 - 3*((a + 5 
*b)*cos(f*x + e)^5 - 2*(a + 5*b)*cos(f*x + e)^3 + (a + 5*b)*cos(f*x + e))* 
log(1/2*cos(f*x + e) + 1/2) + 3*((a + 5*b)*cos(f*x + e)^5 - 2*(a + 5*b)*co 
s(f*x + e)^3 + (a + 5*b)*cos(f*x + e))*log(-1/2*cos(f*x + e) + 1/2) + 16*b 
)/(f*cos(f*x + e)^5 - 2*f*cos(f*x + e)^3 + f*cos(f*x + e))
 
3.1.7.6 Sympy [F]

\[ \int \csc ^5(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=\int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \csc ^{5}{\left (e + f x \right )}\, dx \]

input
integrate(csc(f*x+e)**5*(a+b*sec(f*x+e)**2),x)
 
output
Integral((a + b*sec(e + f*x)**2)*csc(e + f*x)**5, x)
 
3.1.7.7 Maxima [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.25 \[ \int \csc ^5(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=-\frac {3 \, {\left (a + 5 \, b\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) - 3 \, {\left (a + 5 \, b\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) - \frac {2 \, {\left (3 \, {\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{4} - 5 \, {\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{2} + 8 \, b\right )}}{\cos \left (f x + e\right )^{5} - 2 \, \cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )}}{16 \, f} \]

input
integrate(csc(f*x+e)^5*(a+b*sec(f*x+e)^2),x, algorithm="maxima")
 
output
-1/16*(3*(a + 5*b)*log(cos(f*x + e) + 1) - 3*(a + 5*b)*log(cos(f*x + e) - 
1) - 2*(3*(a + 5*b)*cos(f*x + e)^4 - 5*(a + 5*b)*cos(f*x + e)^2 + 8*b)/(co 
s(f*x + e)^5 - 2*cos(f*x + e)^3 + cos(f*x + e)))/f
 
3.1.7.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 262 vs. \(2 (75) = 150\).

Time = 0.31 (sec) , antiderivative size = 262, normalized size of antiderivative = 3.23 \[ \int \csc ^5(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=\frac {12 \, {\left (a + 5 \, b\right )} \log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right ) - \frac {{\left (a + b - \frac {8 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {16 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {18 \, a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {90 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) - 1\right )}^{2}} - \frac {8 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {16 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {128 \, b}{\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1}}{64 \, f} \]

input
integrate(csc(f*x+e)^5*(a+b*sec(f*x+e)^2),x, algorithm="giac")
 
output
1/64*(12*(a + 5*b)*log(abs(-cos(f*x + e) + 1)/abs(cos(f*x + e) + 1)) - (a 
+ b - 8*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 16*b*(cos(f*x + e) - 1)/ 
(cos(f*x + e) + 1) + 18*a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 90*b 
*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)*(cos(f*x + e) + 1)^2/(cos(f*x 
+ e) - 1)^2 - 8*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 16*b*(cos(f*x + 
e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 
 b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 128*b/((cos(f*x + e) - 1)/( 
cos(f*x + e) + 1) + 1))/f
 
3.1.7.9 Mupad [B] (verification not implemented)

Time = 17.54 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.06 \[ \int \csc ^5(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=\frac {\left (\frac {3\,a}{8}+\frac {15\,b}{8}\right )\,{\cos \left (e+f\,x\right )}^4+\left (-\frac {5\,a}{8}-\frac {25\,b}{8}\right )\,{\cos \left (e+f\,x\right )}^2+b}{f\,\left ({\cos \left (e+f\,x\right )}^5-2\,{\cos \left (e+f\,x\right )}^3+\cos \left (e+f\,x\right )\right )}-\frac {\mathrm {atanh}\left (\cos \left (e+f\,x\right )\right )\,\left (\frac {3\,a}{8}+\frac {15\,b}{8}\right )}{f} \]

input
int((a + b/cos(e + f*x)^2)/sin(e + f*x)^5,x)
 
output
(b + cos(e + f*x)^4*((3*a)/8 + (15*b)/8) - cos(e + f*x)^2*((5*a)/8 + (25*b 
)/8))/(f*(cos(e + f*x) - 2*cos(e + f*x)^3 + cos(e + f*x)^5)) - (atanh(cos( 
e + f*x))*((3*a)/8 + (15*b)/8))/f